#!/usr/bin/python
# -*- coding: utf-8 -*-
arr=raw_input()

arr0=arr.split(',')
arr1=''
for i in range(0,len(arr0)):
    if arr0[i][2]=='F':
        arr1 = arr1 + arr0[i][3]
    else:
        arr1 = arr1 + arr0[i][3] + arr0[i][2]
print(arr1)